package com.baidu.location;

import org.json.JSONObject;

public final class a
{
  public String a = null;
  public b b = new b(this);
  private int c = 0;
  private String d = null;
  private double e = 4.9E-324D;
  private double f = 4.9E-324D;
  private boolean g = false;
  private double h = 4.9E-324D;
  private boolean i = false;
  private float j = 0.0F;
  private boolean k = false;
  private float l = 0.0F;
  private boolean m = false;
  private int n = -1;
  private float o = -1.0F;
  private String p = null;
  private String q = null;
  private boolean r = false;
  private boolean s = false;
  private String t = null;
  private boolean u = false;

  public a()
  {
  }

  public a(String paramString)
  {
    if ((paramString == null) || (paramString.equals("")))
      return;
    try
    {
      paramString = new JSONObject(paramString);
      localJSONObject = paramString.getJSONObject("result");
      i1 = Integer.parseInt(localJSONObject.getString("error"));
      this.c = i1;
      this.d = localJSONObject.getString("time");
      if (i1 != 61)
        break label298;
      paramString = paramString.getJSONObject("content");
      localJSONObject = paramString.getJSONObject("point");
      this.e = Double.parseDouble(localJSONObject.getString("y"));
      this.f = Double.parseDouble(localJSONObject.getString("x"));
      a(Float.parseFloat(paramString.getString("radius")));
      this.j = Float.parseFloat(paramString.getString("s"));
      this.i = true;
      this.o = Float.parseFloat(paramString.getString("d"));
      this.n = Integer.parseInt(paramString.getString("n"));
      return;
    }
    catch (Exception paramString)
    {
      paramString.printStackTrace();
      this.c = 0;
      this.r = false;
      return;
    }
    if (i1 == 161)
    {
      label298: localJSONObject = paramString.getJSONObject("content");
      paramString = localJSONObject.getJSONObject("point");
      this.e = Double.parseDouble(paramString.getString("y"));
      this.f = Double.parseDouble(paramString.getString("x"));
      a(Float.parseFloat(localJSONObject.getString("radius")));
      if (localJSONObject.has("addr"))
      {
        paramString = localJSONObject.getString("addr");
        this.b.g = paramString;
        ak.e();
        paramString = paramString.split(",");
        this.b.a = paramString[0];
        this.b.b = paramString[1];
        this.b.c = paramString[2];
        this.b.d = paramString[3];
        this.b.e = paramString[4];
        this.b.f = paramString[5];
        if (((this.b.a.contains("北京")) && (this.b.b.contains("北京"))) || ((this.b.a.contains("上海")) && (this.b.b.contains("上海"))) || ((this.b.a.contains("天津")) && (this.b.b.contains("天津"))) || ((this.b.a.contains("重庆")) && (this.b.b.contains("重庆"))))
        {
          ak.e();
          paramString = this.b.a;
          paramString = paramString + this.b.c + this.b.d + this.b.e;
          this.b.g = paramString;
        }
      }
      for (this.r = true; ; this.r = true)
      {
        while (true)
        {
          if (localJSONObject.has("poi"));
          this.s = true;
          this.q = localJSONObject.getJSONObject("poi").toString();
          return;
          paramString = this.b.a + this.b.b;
        }
        this.r = false;
        this.t = null;
      }
    }
    while (true)
      do
        do
        {
          paramString = paramString.getJSONObject("content");
          localJSONObject = paramString.getJSONObject("point");
          this.e = Double.parseDouble(localJSONObject.getString("y"));
          this.f = Double.parseDouble(localJSONObject.getString("x"));
          a(Float.parseFloat(paramString.getString("radius")));
          this.u = Boolean.valueOf(Boolean.parseBoolean(paramString.getString("isCellChanged"))).booleanValue();
          return;
        }
        while (i1 == 66);
      while (i1 != 68);
  }

  private void a(float paramFloat)
  {
    this.l = paramFloat;
    this.k = true;
  }

  public final String a()
  {
    return this.d;
  }

  public final double b()
  {
    return this.e;
  }

  public final double c()
  {
    return this.f;
  }

  public final float d()
  {
    return this.j;
  }

  public final float e()
  {
    return this.l;
  }

  public final int f()
  {
    return this.c;
  }

  public final int g()
  {
    this.m = true;
    return this.n;
  }

  public final boolean h()
  {
    return this.r;
  }
}